import { configureStore } from "@reduxjs/toolkit";
import themeReducer from "./modules/themeStore";
import loginReducer from "./modules/loginStore";
import assReducer from "./modules/assStore";

const store = configureStore({
  reducer: {
    theme: themeReducer,
    login: loginReducer,
    ass: assReducer,
  },
});

export default store;

// Infer the `RootState` and `AppDispatch` types from the store itself
export type RootState = ReturnType<typeof store.getState>;
// Inferred type: {posts: PostsState, comments: CommentsState, users: UsersState}
export type AppDispatch = typeof store.dispatch;
